<?php
	require_once('config.php');
	$curpage = 'artists';
	
	
	$id = 0;
	if (isset($_REQUEST['id'])) $id = intval($_REQUEST['id']);
	 
	$sort = false;
	if (isset($_REQUEST['sort'])) $sort = $_REQUEST['sort'];
	
	if ($id) {
		$songs = get_artist_songs($id, $sort);
		$name = get_artist_name($id);
		require_once('templates/artist_songs.php');
	} else {
		$artists = get_artist_list($sort);
		require_once('templates/artist_list.php');
	}
?>
